package com.hadoop.mapreduce.fullsort.mapper;

import org.apache.hadoop.io.IntWritable;
import org.apache.hadoop.io.LongWritable;
import org.apache.hadoop.io.Text;
import org.apache.hadoop.mapreduce.Mapper;

import java.io.IOException;

/**
 * @author zouhuixing
 * @date 2023/11/24
 */
public class FullSortMapper extends Mapper<LongWritable, Text, IntWritable, IntWritable> {
    @Override
    protected void map(LongWritable key, Text value, Context context) throws IOException, InterruptedException {
        IntWritable intWritable = new IntWritable(Integer.valueOf(value.toString()));
        context.write(intWritable, intWritable);
    }
}
